package graph;

import java.util.Iterator;
import java.util.LinkedList;

import visitorpattern.Visitor;

import bookworm.Review;

/**
 * this is an interface for our graphs just in case we might want to change the implementation of 
 * graph(such as graph as LinkedList or graph as matrix) easily in our program
 *
 */
public interface BookReviewGraphInterface 
{
	public int getNumberOfEdges();
	public int getNumberOfNodes();
	public boolean isDirected();
	
	
	public BookReviewNode createNewNode(Review reviewData);
	public void createNewEdge(BookReviewNode nodeToConnect1, BookReviewNode nodeToConnect2);
	public BookReviewEdge searchForEdge(BookReviewNode nodeConnected1, BookReviewNode nodeConnected2);
	public BookReviewNode searchForNode(Review reviewOfNode);
	public void removeNode(Review reviewDataToRemove);
	public void removeEdge(BookReviewNode nodeConnected1, BookReviewNode nodeConnected2);
	
	public boolean isThereAnEdgeBetweenReviews(Review reviewData1, Review reviewData2);
	
	public Iterator<BookReviewEdge> getBookReviewEdges();
	public Iterator<BookReviewNode> getBookReviewNodes();
	
	public LinkedList<BookReviewNode> depthFirstTraversal(Visitor visitsNode);
	public LinkedList<BookReviewNode> breadthFirstTraversal(Visitor visitsNode);
	
}
